package cmo.neutech.day10.HomeWork.d2;

import java.util.Random;

public class Vehicle {
    String brand;
    String color;
    double speed;
    Random random = new Random();

    public String getBrand() {
        return brand;
    }
    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }
    public Vehicle (){
    }

    public  Vehicle (String brand,String color){
        this.brand = brand;
        this.color = color;
        this.speed = 0;
    }

   public void run(){
       System.out.println("汽车品牌是"+brand+"，颜色是"+color+"，速度是"+speed+"km/h");
   }


}
